<template>
  <h2 :style="{color}">GrandSon孙子组件</h2>
  <hr>
</template>

<script lang='ts'>
import { defineComponent, inject} from "vue";
    
export default defineComponent({
  name: "GrandSon子级组件",
  setup() {
    const color = inject('color');
    return {
      color
    };
  },
});
</script>
